<div class="col-md-12 article">
    <div class="col-md-12 text-center">
        <h2 class="category-header">目录</h2>
        <hr>
    </div>
    <div class="col-md-12">
        <ul class="list-unstyled">
            {% for category in category_list %}
                <li>
                    <a href="{% url 'category-article-list' category.id %}">
                        <p>
                            <span class="text-left">&nbsp;{{ category.name }}</span>
                            <span class="text-right" style="float: right">
                                <span class="badge">{{ category.blog_numer }}</span>
                            </span>
                        </p>
                    </a>
                </li>
            {% empty %}
                <li>
                    <p>
                        <span class="text-left">&nbsp;暂无分类</span>
                    </p>
                </li>
            {% endfor %}
        </ul>
    </div>
</div>